package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by 婷婷 on 2017/11/13.
 */
public class Test28 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);

        System.out.println("输入圆的半径：");
        try {
            double radius = sc.nextDouble();
            double area = 3.14 * radius * radius;
            System.out.println("圆的面积是：" + area);

        } catch (InputMismatchException e) {
            System.out.println("捕捉到异常：你输入的数据不是数值型！");

        }
    }
}
